//
//  ProductDetailBannerCell.m
//  ExhibitionHall
//
//  Created by 王洋 on 2019/6/12.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "ProductDetailBannerCell.h"

@implementation ProductDetailBannerCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

        [self layout];
    }
    return self;
}

- (void)layout {
    
    [self addSubview:self.bannerView];
    
    [self.bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.bottom.mas_equalTo(0);
    }];
    
}

- (void)configBannerCellWithModel:(NSMutableArray *)arr ImgClickedBlock:(CycleImgClickedBlock )block {
    
//   NSArray *array = @[
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487496514&di=6df642c7fcd416eee9723a1f0fe0af36&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fphotoblog%2F1202%2F13%2Fc0%2F10410979_10410979_1329065644468.jpg",
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487496514&di=45599a6107318bd383449fb885da919f&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fphotoblog%2F1410%2F07%2Fc4%2F39353741_39353741_1412674956971.jpg",
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487496511&di=1841cfb8db9ddf1f502d7385f1faa242&imgtype=0&src=http%3A%2F%2Fpic7.nipic.com%2F20100429%2F1412106_092608578069_2.jpg",
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487536585&di=1701f9990626982945c2a5b6edadcccd&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fphotoblog%2F1308%2F19%2Fc3%2F24648996_24648996_1376926604453.jpg",
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487536580&di=434bf1c1f8101427d671f180311e7fa1&imgtype=0&src=http%3A%2F%2Fpic43.nipic.com%2F20140711%2F52770_200417958000_2.jpg",
//        @"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1559487536579&di=612c1f506dbd449147fb23d018a2fbfd&imgtype=0&src=http%3A%2F%2Fimg8.zol.com.cn%2Fbbs%2Fupload%2F22979%2F22978191.JPG"
//        ].mutableCopy;
    self.bannerView.imageURLStringsGroup = [arr mutableCopy];
}

- (SDCycleScrollView *)bannerView {
    if (!_bannerView) {
        _bannerView = [[SDCycleScrollView alloc] init];
        _bannerView.bannerImageViewContentMode = UIViewContentModeScaleToFill;
        
    }
    return _bannerView;
}

@end
